Dynomotion

Group: DynoMotion Message: 11301 From: bknighton28 Date: 4/8/2015
Subject: A problem reversing the axis direction

Using kmotion432 with closed loop microstepping:

As per the FAQ I have reversed the direction of the axis by changing the sign of the outputgain and the sign of the inputgain0. This creates a problem.  Maybe it could be described as a huge position error.  It still runs.  

Step response plots of the axis before and after its was reversed are attached. The reversed is the one with negative gains. 

The motion parameters of the settings that cause the error:

ch0->InputMode=ENCODER_MODE;

ch0->OutputMode=CL_MICROSTEP_MODE;

ch0->Vel=300;

ch0->Accel=1000;

ch0->Jerk=80000;

ch0->P=0;

ch0->I=0.0017;

ch0->D=0;

ch0->FFAccel=0;

ch0->FFVel=0.0005;

ch0->MaxI=10000;

ch0->MaxErr=1e+009;

ch0->MaxOutput=10000;

ch0->DeadBandGain=1;

ch0->DeadBandRange=0;

ch0->InputChan0=12;

ch0->InputChan1=0;

ch0->OutputChan0=8;

ch0->OutputChan1=9;

ch0->MasterAxis=-1;

ch0->LimitSwitchOptions=0x100;

ch0->LimitSwitchNegBit=0;

ch0->LimitSwitchPosBit=0;

ch0->SoftLimitPos=1e+006;

ch0->SoftLimitNeg=-1e+006;

ch0->InputGain0=-0.025;

ch0->InputGain1=1;

ch0->InputOffset0=0;

ch0->InputOffset1=0;

ch0->OutputGain=-1;

ch0->OutputOffset=0;

ch0->SlaveGain=1;

ch0->BacklashMode=BACKLASH_OFF;

ch0->BacklashAmount=0;

ch0->BacklashRate=0;

ch0->invDistPerCycle=1;

ch0->Lead=0;

ch0->MaxFollowingError=1000;

ch0->StepperAmplitude=204;


ch0->iir[0].B0=1;

ch0->iir[0].B1=0;

ch0->iir[0].B2=0;

ch0->iir[0].A1=0;

ch0->iir[0].A2=0;


ch0->iir[1].B0=1;

ch0->iir[1].B1=0;

ch0->iir[1].B2=0;

ch0->iir[1].A1=0;

ch0->iir[1].A2=0;


ch0->iir[2].B0=1;

ch0->iir[2].B1=0;

ch0->iir[2].B2=0;

ch0->iir[2].A1=0;

ch0->iir[2].A2=0;



  @@attachment@@
Group: DynoMotion Message: 11303 From: Tom Kerekes Date: 4/8/2015
Subject: Re: A problem reversing the axis direction [2 Attachments]
Hi Bill,

Sorry we need to update that FAQ.  For SnapAmp Microstep/CL Micro modes OutputGain doesn't apply.  Instead change the sign of invDistPerCycle.

As a side note if you intend to use Mach3 it was recently pointed out that the Mach3 DROs only accept integer units (steps) and SnapAmp Stepper cycles are somewhat coarse resulting in significant DRO display errors.  So it is better to use a smaller inDispPerCycle value than 1.0.  For example -0.001 or + 0.001.  This will require changes to all your distances, velocities, accelerations, jerks by a factor of 1000 to be the same as before.

Regards
TK